<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

return array(
   'router' => array(
        'routes' => array(
            'youobserve' => array(
                'type' => 'Segment',
                'options' => array(
                    'route' => '/[:controller[/:action]]',
                    'constraints' => array(
                        'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'Youobserve\Controller',
                        'controller'    => 'Index',
                        'action'        => 'index',
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                        'wildcard' => array(
                            'type' => 'Wildcard',
                                'options' => array(
                                    'key_value_delimiter' => '/',
                                    'param_delimiter' => '/',
                                ),
                        )
                )
            ),
        ),
    ),

    'service_manager' => array(
        'factories' => array(
        ),
    ),
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
        ),
    ),
    'controllers' => array(
        'invokables' => array(
            'Youobserve\Controller\Index'                => 'Youobserve\Controller\IndexController',
            'Youobserve\Controller\Info'                 => 'Youobserve\Controller\InfoController',
            'Youobserve\Controller\Login'                => 'Youobserve\Controller\LoginController',
            'Youobserve\Controller\Logout'               => 'Youobserve\Controller\LogoutController',
            'Youobserve\Controller\Contact'              => 'Youobserve\Controller\ContactController',
            'Youobserve\Controller\DataEntry'            => 'Youobserve\Controller\DataEntryController',
            'Youobserve\Controller\RecordImport'         => 'Youobserve\Controller\RecordImportController',
            'Youobserve\Controller\JsonTaxonSearch'      => 'Youobserve\Controller\JsonTaxonSearchController',
            'Youobserve\Controller\JsonRecordAdd'        => 'Youobserve\Controller\JsonRecordAddController',
            'Youobserve\Controller\JsonRecordUpdate'     => 'Youobserve\Controller\JsonRecordUpdateController',
            'Youobserve\Controller\AjaxSearchRecordJson' => 'Youobserve\Controller\AjaxSearchRecordJsonController',
            'Youobserve\Controller\AjaxSearchRecordJson2' => 'Youobserve\Controller\AjaxSearchRecordJson2Controller',
            'Youobserve\Controller\AjaxRecordGetJson'     => 'Youobserve\Controller\AjaxRecordGetJsonController',
            'Youobserve\Controller\Gbif' => 'Youobserve\Controller\GbifController',
        ),
    ),



    'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/index',
        'template_map' => array(
            'layout/youobserve'            => __DIR__ . '/../view/layout/index.phtml',
            'youobserve/index/index'       => __DIR__ . '/../view/youobserve/index/index.phtml',
            'error/404'               => __DIR__ . '/../view/error/404.phtml',
            'error/index'             => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),

        'strategies' => array(
            'ViewJsonStrategy',
        ),

    ),
);
